package JavaSE.ThreadLearning.ThreadSleep;

/**
 * 学习 使用sleep方法使线程休眠---毫秒数
 */
public class ThreadSleep {
    public static void main(String[] args) {
        new Count().start();
    }
}

class Count extends Thread {
    public static void count() {
        for (int i = 0; i < 100; i++) {
            System.out.println(i);
            try {
                sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }

    @Override
    public void run() {
        count();

    }
}
